package com.ruleengine.worker.rulechain;

import com.ruleengine.worker.model.Chain;
import com.ruleengine.worker.model.Status;

/**
 * TODO-lhw-2024/03/15
 * 1. bean
 * 2. admin 对应的 controller 去用
 *
 * @author lianghanwei on 2024/3/10
 */
public interface ChainManager {

    void addChain(Chain chain);

    Chain getChain(String chainId);

    Chain getChain(String chainId, int expectedMinVersion);

    void deleteChain(String chainUid);

    // TODO-lhw-2024/03/10: 考虑多副本如何都通知更新
    void updateChain(String chainId, Chain chain);

    void updateStatus(String chainId, int expectedVersion, Status status);

}
